<template>
  <Card size="small" class="mb-2 h-full">
    <div class="flex flex-col h-[600px]">
      <div
        class="mx-auto font-bold text-3xl mb-4 mt-60">
        Welcome to MediaCMS!
      </div>
      <div class="mx-auto">
        Start uploading media and sharing your
        work!
      </div>
      <a href="/"
        class="mx-auto mt-4 c-primary border p-2 rounded-lg text-lg font-bold">
        UPLOAD MEDIA
      </a>
    </div>
  </Card>
</template>
<script setup lang="ts">
// eslint-disable-next-line max-classes-per-file
import {
  Card,
} from 'ant-design-vue';
import { all } from 'radash';
import { onMounted } from 'vue';

import { getMedia, getMediaFeatured, getMediaRecommended } from '../api';

const handleInit = async () => {
  const { mediaList, recommendedList, featuredList } = await all({
    mediaList: getMedia(),
    recommendedList: getMediaRecommended(),
    featuredList: getMediaFeatured(),
  });

  console.log(mediaList.data, recommendedList.data, featuredList.data);
};
onMounted(async () => {
  handleInit();
});

</script>
